<nav class="navbar navbar-default navbar-inverse" role="navigation">
  <!-- Brand and toggle get grouped for better mobile display -->
  <div class="container">
    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
        <li class="dropdown">
            <a class="btag" href="<?php echo yii::app()->homeUrl?>">首页</a>
        </li>
        <?php for($i = 0;$i < count($this->menuitemModel);$i++):?>
          <?php $submenuModel = $this->menuitemModel[$i]->tblSubmenus;?>
          <li class="dropdown">
              <a href="#" class="dropdown-toggle atag" data-toggle="dropdown">
                  <?php echo CHtml::encode($this->menuitemModel[$i]->title);?>
              </a>
              <ul class="dropdown-menu">
                <?php for($j = 0;$j < count($submenuModel);$j++):?>
                <li>
                    <?php echo CHtml::link($submenuModel[$j]->title,array(
                    'display/view/'.$submenuModel[$j]->submenu_id.'/'.$submenuModel[$j]->menuitem->menuitem_id)
                    );?>
                </li>
                <?php endfor;?>
                <?php for($l = 0;$l < count($this->specialMenuItem);$l++):?>
                    <?php if($this->specialMenuItem[$l]['relegation'] == $this->menuitemModel[$i]->menuitem_id):?>
                    <li>
                        <?php echo CHtml::link($this->specialMenuItem[$l]['name'],array($this->specialMenuItem[$l]['url']));?>
                    </li>
                    <?php endif;?>
                <?php endfor;?>
              </ul>
          <?php endfor;?>
          </li>
        <li class="dropdown">
              <a href="#" class="dropdown-toggle atag" data-toggle="dropdown">教学资源</a>
              <ul class="dropdown-menu">
                <li><a href="<?php echo yii::app()->baseUrl.'/display/instrument'?>">仪器资源</a></li>
                <li><a target="blank" href="http://bb.gliet.edu.cn/webapps/portal/frameset.jsp?tab_tab_group_id=_2_1&url=%2Fwebapps%2Fblackboard%2Fexecute%2FcourseMain%3Fcourse_id%3D_295_1">精品课程</a></li>
                <li><a target="blank" href="http://ocw.guet.edu.cn/">学习资源</a></li>
              </ul>
        </li>
        <li class="dropdown">
              <a href="#" class="dropdown-toggle atag" data-toggle="dropdown">成果展示</a>
              <ul class="dropdown-menu">
                <li><a href="<?php echo yii::app()->baseUrl.'/display/schoolenterprise'?>">校企合作</a></li>
                <li><a href="<?php echo yii::app()->baseUrl.'/display/scientificachievement'?>">科研成果转化</a></li>
              </ul>
        </li>
        <li class="dropdown">
              <a href="#" class="dropdown-toggle atag" data-toggle="dropdown">实验平台</a>
              <ul class="dropdown-menu">
                <?php $pModel = Platform::model()->findAll();?>
                <?php foreach($pModel as $elem):?>
                    <li><a href="<?php echo yii::app()->baseUrl.'/platform/view/'.$elem->id?>"><?php echo $elem->title?></a></li>
                <?php endforeach;?>
              </ul>
        </li>
        <li class="dropdown">
            <a class="btag" href="<?php echo yii::app()->baseUrl.'/ask'?>">交互平台</a>
        </li>
       <li class="dropdown">
              <a class="btag" href="<?php echo yii::app()->baseUrl.'/display/contactus'?>">联系我们</a>
        </li>
    </ul>
    <div class="pull-right search-form">
            <form id="search" action="<?php echo yii::app()->baseUrl.'/site/search'?>">
                <div class="col-xs-8"><input id="key-word" type="text" name="search" class="form-control" placeholder="请输入关键字"></div>
                <div class="col-xs-4"><input id="search-sub" type="submit" class="btn btn-primary" value="搜索"></div>
            </form>
    </div>
  </div>
</div>
</nav>
